﻿#region Usings

using System.Collections.Generic;
using System.Windows.Controls;

#endregion

namespace SilverBox.Extensions
{
    /// <summary>
    /// DataGrid Extensions
    /// </summary>
    public static class DataGridExtensions
    {
        /// <summary>
        /// Get the DataGrid rows
        /// </summary>
        /// <param name="dataGrid"></param>
        /// <returns>DataGrid Rows Collection</returns>
        public static IEnumerable<DataGridRow> GetRows(this DataGrid dataGrid)
        {
            return dataGrid.GetAllControlsByType<DataGridRow>();
        }
    }
}